#include <stdio.h>
#include <stdlib.h>

int main(int argc, char* argv[])
{
    int year = 0, month = 0, day = 0;
    int flag = 0;
    int cnt = 0;
    for (year = 2014; year < 2020; year++)
    {
        for (month = 1; month <= 12; month++)
        {
            for (day = 1; day <= 31; day++)
            {
                if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12)
                {
                    ;
                }
                else if (month == 2)
                {
                    if (year % 4 == 0)
                    {
                        if (day > 29) break;
                    }
                    else
                    {
                        if (day > 28) break;
                    }
                }
                else
                {
                    if (day > 30) break;
                }

                if (year == 2014 && month == 11 && day == 9) flag = 1;
                if (flag == 1) cnt++;
                if (cnt == 1001)
                {
                    printf("%d-%02d-%02d", year, month, day);
                    break;
                }
            }
        }
    }
    return 0;
}